// var indexURL = "http://localhost:8080/hjcr-wechat/user/getUserbyOpenId";
var indexURL = "./json/index.json";
$(document).ready(function(){
  $.get(indexURL, function(res){
    if(res.serviceResult){
      var data = res.resultParm.user;
      $(".name").text(data.userName);//姓名
      $(".membership").text(res.resultParm.countFirstChildrenAgent);//代理人数
      $(".headImg").attr("src",data.headImgUrl);//头像
      $(".money").text(data.balance);//余额
      $(".jifen").text(data.integration);//积分
      // $(".message-count").text(data.mess);//消息
      sessionStorage.balance = data.balance;
      sessionStorage.integration = data.integration;
      sessionStorage.userId = data.userId;
    }
  });
});
